﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WopiCobaltHost
{
    class Program
    {
        static void Main()
        {
            string _dir = ConfigurationManager.AppSettings["dir"];
            string _host = ConfigurationManager.AppSettings["host"];
            string _port = ConfigurationManager.AppSettings["port"];
            

            CobaltServer svr = new CobaltServer(_dir, _host, _port);
            svr.Start();

            Console.WriteLine("A simple wopi server. Press exit to quit.");

             
            do
            {
                string input = Console.ReadLine();
                switch (input)
                {
                    case "exit":
                        svr.Stop();
                        return;

                    case "clear":
                        Console.Clear();
                        break;

                    default:
                        Console.Clear();
                        Console.WriteLine("UNKONW CMD");
                        break;
                }

            } while (true);
          

        }
    }
}
